package com.lh.service;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.RectificationInfo;
import com.lh.entity.vo.CountAmountBefore;
import com.lh.entity.vo.DeadlineNodeOutput;
import com.lh.utils.Answer;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


public interface RectificationInfoService {
    Answer<Object> add(RectificationInfo rectificationInfo);

    Answer<Object> checkName(RectificationInfo rectificationInfo);

    Answer<Object> addRectification(RectificationInfo rectificationInfo);

    Answer<Object> getRectificationList(JSONObject reqJson);

    Answer<Object> updateRectification(RectificationInfo rectificationInfo);

    Answer<Object> AddDeadlineNode(JSONObject reqJson);

    Answer<Object> distribute(JSONObject reqJson);

    Answer<Object> queryDeadlineNodeList(RectificationInfo rectificationInfo);

    Answer<Object> queryDistributeDeadlineNodeList(RectificationInfo rectificationInfo);

    Answer<Object> issueConfirmation(RectificationInfo rectificationInfo);

    Answer<Object> queryRectificationList(RectificationInfo rectificationInfo);

    Answer<Object> queryDirTreeByType(String type);

    // 根据当前部门查树
    Answer<Object> queryDirTreeType(String currentDepartment);

    Answer<Object> queryDirTreeByTypeAll(String type,String departmentName,String leadUnit);

    Answer<Object> queryRectificationPage(JSONObject reqJson);


    Answer<Object> queryRectificationListV2(RectificationInfo rectificationInfo);

    // 分页加载
    Answer<Object> queryRectificationPageV2(JSONObject reqJson);

    Answer<Object> queryRectificationStaticV2(RectificationInfo rectificationInfo);


    Answer<Object> selectDepartmentNameList();

    void exportRectificationList(JSONObject reqJson, HttpServletResponse response);

    void exportRectificationManagement(JSONObject reqJson, HttpServletResponse response);

    Answer<String> getLinkTotal();

    void exportDeadlineByMainId(DeadlineNodeOutput req, HttpServletResponse response);

    Answer<Object> groupByTitle();

    Answer<Object> groupByPersonLiaible();

    Answer<Object> groupByDepartment();

    Answer<Object> groupByLeadLeader();

    Answer<Object> groupByCurrentNode();

    Answer<Object> getRectificationInfoByLike(RectificationInfo rectificationInfo);

    Answer<Object> queryRectificationV2Num();

    /**
     * 按类型分类
     * @param currentDepartment
     * @return
     */
    Answer<Object> groupByType(String currentDepartment,Integer warnLevel,String zerenDepartment);

    /**
     * 查询环节的部门的树
     * @param reqJson
     * @return
     */
    Answer<Object> groupNodeDepartmentType(JSONObject reqJson);

    /**
     * 获取区划的架构树
     * @param currentDepartment
     * @return
     */
    Answer<Object> groupByArea(String currentDepartment,Integer warnLevel,String zerenDepartment);

    /**
     * 按部门分类
     * @param currentDepartment
     * @return
     */
    Answer<Object> groupByDepartment(String currentDepartment,Integer warnLevel,String zerenDepartment);

    // 计算已经完成的数和红绿灯数量


    /**
     * 按市直部门拆分
     * @return
     */
    Answer<Object> queryRectificationV2NumCity();

    Answer<Object> queryRectificationNodeCity();

    Answer<Object> queryStaticAllScreen();

    Answer<Object> queryRectificationV2ProjectType(RectificationInfo rectificationInfo);

    Answer<Object> deleteItem(Integer id);


    Answer<Object> rectificationAnalyzeByStreet();

    Answer<Object> rectificationAnalyzeByCity();

    /**
     * 统计责任人的清单.
     * @return
     */
    Answer<Object> rectificationAnalyzeByPeople();

    Answer<Object> rectificationAnalyzeByPeople2();


    Answer<Object> rectificationDeadlineAnalyzeByCity();

    /**
     * 类别的总览
     * @return
     */
    Answer<Object> rectificationAnalyze();

    Answer<Object> getRectificationInfoXF();

    Answer<Object> rectificationAnalyzeByArea();

    Answer<Object> getRectificationInfoById(JSONObject reqJson);

    Answer<Object> getRectificationListByDeadLine();

    Answer<Object> getRectificationListByUpdateDeadline(JSONObject reqJson);

    Answer<Object> countLightByStreet();

    Answer<Object> countLightByOrganization();

    Answer<Object> countLight(JSONObject reqJson);

    Answer<Object> lightRectification(JSONObject reqJson);

    void exportCountLightByStreet(DeadlineNodeOutput req, HttpServletResponse response);

    void exportCountLightByOrganization(DeadlineNodeOutput req, HttpServletResponse response);

    void exportCountLight(DeadlineNodeOutput req, HttpServletResponse response);

    void exportLightRectification(DeadlineNodeOutput req, HttpServletResponse response);

    Answer<Object> countAmount(String projectStatus);

    Answer<Object> countAmountInvestment(String projectStatus);

    Answer<Object> countAmountBefore(JSONObject reqJson);

    void exportCountAmount(DeadlineNodeOutput req, HttpServletResponse response,JSONObject reqJson);

    void exportCountAmountInvestment(DeadlineNodeOutput req, HttpServletResponse response,JSONObject reqJson);

    void exportCountAmountBefore(DeadlineNodeOutput req, HttpServletResponse response,JSONObject reqJson);

    Answer<Object> countAmountDetails(JSONObject reqJson);

    Answer<Object> rectificationDetails(JSONObject reqJson);

    void exportRectificationDetails(DeadlineNodeOutput req, HttpServletResponse response,JSONObject reqJson);

    Answer<Object> deadlineRed();

    void exportDeadlineRed(DeadlineNodeOutput req, HttpServletResponse response);

    Answer<Object> countRedLight();

    void exportCountRedLight(DeadlineNodeOutput req, HttpServletResponse response);

    Answer<Object> terminationRectification(JSONObject reqJson);

    void exportTerminationRectification(DeadlineNodeOutput req, HttpServletResponse response,JSONObject reqJson);

    Answer<Object> getTodayUpdate(JSONObject reqJson);

    Answer<Object> getOverdueLink();
}
